package com.day.service.impl;

import com.day.mapper.DormitoryMapper;
import com.day.pojo.Dormitory;
import com.day.service.DormitoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DormitoryServiceImpl implements DormitoryService {

    @Autowired
    DormitoryMapper dormitoryMapper;

    @Override
    public List<Dormitory> getDormitoryList() {
        return dormitoryMapper.getDormitoryList();
    }

    @Override
    public Dormitory getDormitoryById(Integer d_id) {
        return dormitoryMapper.getDormitoryById(d_id);
    }

    @Override
    public void addDormitory(Dormitory dormitory) {
        dormitoryMapper.addDormitory(dormitory);
    }

    @Override
    public void delDormitoryById(Integer d_id) {
        dormitoryMapper.delDormitoryById(d_id);
    }

    @Override
    public void editDormitoryById(Dormitory dormitory) {
        dormitoryMapper.editDormitoryById(dormitory);
    }
}
